Optimal. Leaf size=109 \[ \frac {\sqrt {2} (A+C) \text {ArcTan}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {2} \sqrt {a+a \sec (c+d x)}}\right )}{\sqrt {a} d}-\frac {4 C \tan (c+d x)}{3 d \sqrt {a+a \sec (c+d x)}}+\frac {2 C \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{3 a d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.14, antiderivative size = 109, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.121, Rules used = {4168, 4086,
3880, 209} \begin {gather*} \frac {\sqrt {2} (A+C) \text {ArcTan}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {2} \sqrt {a \sec (c+d x)+a}}\right )}{\sqrt {a} d}+\frac {2 C \tan (c+d x) \sqrt {a \sec (c+d x)+a}}{3 a d}-\frac {4 C \tan (c+d x)}{3 d \sqrt {a \sec (c+d x)+a}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rule 3880
Rule 4086
Rule 4168
Rubi steps
\begin {align*} \int \frac {\sec (c+d x) \left (A+C \sec ^2(c+d x)\right )}{\sqrt {a+a \sec (c+d x)}} \, dx &=\frac {2 C \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{3 a d}+\frac {2 \int \frac {\sec (c+d x) \left (\frac {1}{2} a (3 A+C)-a C \sec (c+d x)\right )}{\sqrt {a+a \sec (c+d x)}} \, dx}{3 a}\\ &=-\frac {4 C \tan (c+d x)}{3 d \sqrt {a+a \sec (c+d x)}}+\frac {2 C \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{3 a d}+(A+C) \int \frac {\sec (c+d x)}{\sqrt {a+a \sec (c+d x)}} \, dx\\ &=-\frac {4 C \tan (c+d x)}{3 d \sqrt {a+a \sec (c+d x)}}+\frac {2 C \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{3 a d}-\frac {(2 (A+C)) \text {Subst}\left (\int \frac {1}{2 a+x^2} \, dx,x,-\frac {a \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{d}\\ &=\frac {\sqrt {2} (A+C) \tan ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {2} \sqrt {a+a \sec (c+d x)}}\right )}{\sqrt {a} d}-\frac {4 C \tan (c+d x)}{3 d \sqrt {a+a \sec (c+d x)}}+\frac {2 C \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{3 a d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.61, size = 125, normalized size = 1.15 \begin {gather*} -\frac {2 \cos \left (\frac {c}{2}\right ) \cos (c) \left (3 \sqrt {2} (A+C) \text {ArcTan}\left (\frac {\sqrt {-1+\sec (c+d x)}}{\sqrt {2}}\right ) \sqrt {-1+\sec (c+d x)}+8 C \sec ^2(c+d x) \sin ^4\left (\frac {1}{2} (c+d x)\right )\right ) \sin (c+d x)}{3 d \left (\cos \left (\frac {c}{2}\right )+\cos \left (\frac {3 c}{2}\right )\right ) (-1+\cos (c+d x)) \sqrt {a (1+\sec (c+d x))}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(384\) vs.
\(2(92)=184\).
time = 12.82, size = 385, normalized size = 3.53
method | result | size |
default | \(-\frac {\left (3 A \sin \left (d x +c \right ) \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {3}{2}} \cos \left (d x +c \right ) \ln \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right )-\cos \left (d x +c \right )+1}{\sin \left (d x +c \right )}\right )+3 C \sin \left (d x +c \right ) \cos \left (d x +c \right ) \ln \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right )-\cos \left (d x +c \right )+1}{\sin \left (d x +c \right )}\right ) \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {3}{2}}+3 A \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {3}{2}} \ln \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right )-\cos \left (d x +c \right )+1}{\sin \left (d x +c \right )}\right ) \sin \left (d x +c \right )+3 C \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {3}{2}} \ln \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right )-\cos \left (d x +c \right )+1}{\sin \left (d x +c \right )}\right ) \sin \left (d x +c \right )-4 C \left (\cos ^{2}\left (d x +c \right )\right )+8 C \cos \left (d x +c \right )-4 C \right ) \sqrt {\frac {a \left (1+\cos \left (d x +c \right )\right )}{\cos \left (d x +c \right )}}}{6 d \sin \left (d x +c \right ) \cos \left (d x +c \right ) a}\) | \(385\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 3.38, size = 336, normalized size = 3.08 \begin {gather*} \left [\frac {3 \, \sqrt {2} {\left ({\left (A + C\right )} a \cos \left (d x + c\right )^{2} + {\left (A + C\right )} a \cos \left (d x + c\right )\right )} \sqrt {-\frac {1}{a}} \log \left (-\frac {2 \, \sqrt {2} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt {-\frac {1}{a}} \cos \left (d x + c\right ) \sin \left (d x + c\right ) - 3 \, \cos \left (d x + c\right )^{2} - 2 \, \cos \left (d x + c\right ) + 1}{\cos \left (d x + c\right )^{2} + 2 \, \cos \left (d x + c\right ) + 1}\right ) - 4 \, {\left (C \cos \left (d x + c\right ) - C\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{6 \, {\left (a d \cos \left (d x + c\right )^{2} + a d \cos \left (d x + c\right )\right )}}, -\frac {2 \, {\left (C \cos \left (d x + c\right ) - C\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right ) + \frac {3 \, \sqrt {2} {\left ({\left (A + C\right )} a \cos \left (d x + c\right )^{2} + {\left (A + C\right )} a \cos \left (d x + c\right )\right )} \arctan \left (\frac {\sqrt {2} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right )}{\sqrt {a} \sin \left (d x + c\right )}\right )}{\sqrt {a}}}{3 \, {\left (a d \cos \left (d x + c\right )^{2} + a d \cos \left (d x + c\right )\right )}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (A + C \sec ^{2}{\left (c + d x \right )}\right ) \sec {\left (c + d x \right )}}{\sqrt {a \left (\sec {\left (c + d x \right )} + 1\right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.26, size = 129, normalized size = 1.18 \begin {gather*} -\frac {\frac {4 \, \sqrt {2} C a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3}}{{\left (a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - a\right )} \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a} \mathrm {sgn}\left (\cos \left (d x + c\right )\right )} + \frac {3 \, \sqrt {2} {\left (A + C\right )} \log \left ({\left | -\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a} \right |}\right )}{\sqrt {-a} \mathrm {sgn}\left (\cos \left (d x + c\right )\right )}}{3 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {A+\frac {C}{{\cos \left (c+d\,x\right )}^2}}{\cos \left (c+d\,x\right )\,\sqrt {a+\frac {a}{\cos \left (c+d\,x\right )}}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________